package com.example.reward.api;// RewardApi.java

import com.example.reward.response.Result;
import com.example.reward.response.RewardResultDto;
import com.example.reward.response.StudentDto;
import com.example.reward.response.Subject;
import com.example.reward.response.UserDto;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

public interface RewardApi {
    @POST("reward/calculate")
    Call<RewardResultDto> calculateReward(@Body StudentDto request);

    @GET("reward/result")
    Call<List<RewardResultDto>> getResult();

    @GET("reward/subjects")
    Call<List<Subject>> getSubjects();

    @GET("reward/profile")
    Call<UserDto> getProfile();

    @POST("reward/profile")
    Call<UserDto> updateProfile(@Body UserDto request);

    @Multipart
    @POST("reward/avatar")
    Call<Result<Integer>> updateAvatar(
            @Part MultipartBody.Part file,
            @Part("id") RequestBody userId
    );
}
